package br.ufpi.util.notification;

import org.apache.commons.mail.EmailException;
import org.apache.commons.mail.HtmlEmail;

/**
 * Classe respons�vel por enviar email a partir do Kill Line.
 * Para tornar o envio mais efici�nte foi necess�rio a utiliza��o
 * de threads.
 * 
 * @author EasyTeam, created by Pedro Almir
 *
 */
public class HtmlEmailUtil {

	/**
	 * Send mail
	 * @param htmlEmail
	 */
	public static void sendEmail(final HtmlEmail htmlEmail) {
		new Thread(new Runnable() {

			@Override
			public void run() {
				try {
					htmlEmail.send();
				} catch (EmailException e) {
					e.printStackTrace();
				}
			}
		}).start();
	}

}
